package com.mahu.googleplay.base;

import android.app.Application;
import android.os.Handler;
import android.os.Looper;

/**
 * Created by Tiger on 2016/10/22.
 */

public class BaseApplication extends Application {

    private static BaseApplication mContext = null;
    private static Handler mMainThreadHandler = null;
    private static Thread mMainThread = null;
    private static int mMainThreadId;
    private static Looper mMianThreadLooper=null;

    @Override
    public void onCreate() {
        super.onCreate();
        this.mContext = mContext;
        this.mMainThreadHandler = new Handler();
        this.mMainThread = Thread.currentThread();
        this.mMainThreadId = android.os.Process.myTid();
        this.mMianThreadLooper=getMainLooper();
    }

    public static BaseApplication getContext() {
        return mContext;
    }

    public static Handler getMainThreadHandler() {
        return mMainThreadHandler;
    }


    public static Thread getMainThread() {
        return mMainThread;
    }

    public static int getMainThreadId() {

        return mMainThreadId;
    }
}
